package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    int insert(User record);

    User selectByPrimaryKey(Long id);

    List<User> selectForList(QueryObject qo);

    int updateByPrimaryKey(User record);

    User queryByEmailAndPassword(@Param("email") String email, @Param("password") String password);

    void insertRelations(@Param("id") Long id, @Param("followerId") Long followerId);

    int getNums(Long userId);
    int getFans(Long userId);

    void deleteRelations(@Param("id") Long id, @Param("followerId") Long followerId);

    String selectIsRelation(@Param("userId") Long userId, @Param("followerId") Long followerId);
}